package agents.relations;

import java.awt.Point;

import model.Model;
import model.Model.Individuals;
import model.mapping.MapPoint;

public class Vehicle {

	private Model model;
	private int x;
	private int y;
	private int typeVehicle;
	
	public Vehicle(Model model,int typeVehicle) {
		
		this.model = model;
		this.typeVehicle = typeVehicle;
	}
	
	public int getTypeVehicle() {
		return typeVehicle;
	}
	
	public void setTypeVehicle(int typeVehicle) {
		this.typeVehicle = typeVehicle;
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public void takePlace(int posx,int posy) {
		
		x = posx;
		y = posy;
		model.getModelMapBuilder().getDriverMap()[x][y].setOccupant(Individuals.VEHICLE.ordinal());
	}
	
	public void freePlace() {
		
		model.getModelMapBuilder().getDriverMap()[x][y].setOccupant(Individuals.FREE.ordinal());
	}
}
